package day012.api.object;

public class Student {
    private String name = "xj";

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
//        return "Student [name=" + name + "]";
        return super.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof Student) {
            return this.name == (((Student) obj).name);
        } else {
            return false;
        }
    }
}
